# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Lauri Niskanen <ape@ape3000.com>

pkgname=libretro-gambatte
pkgver=994
pkgrel=1
pkgdesc='Nintendo Game Boy/Game Boy Color core'
arch=(loong64 x86_64)
url=https://github.com/libretro/gambatte-libretro
license=(GPL2)
groups=(libretro)
depends=(libretro-core-info)
makedepends=(git)
_commit=b13159169d22fcb8b976f4e3ab8620b16aeca514
source=(libretro-gambatte::git+https://github.com/libretro/gambatte-libretro.git#commit=${_commit})
sha256sums=(SKIP)

pkgver() {
  cd libretro-gambatte

  git rev-list --count HEAD
}

build() {
  make -C libretro-gambatte -f Makefile.libretro
}

package() {
  install -Dm 644 libretro-gambatte/gambatte_libretro.so -t "${pkgdir}"/usr/lib/libretro/
}

# vim: ts=2 sw=2 et:
